package com.example.brinquedohamilton;

import java.util.Random;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PointF;
import android.util.Log;
import android.view.MotionEvent;

public class Professor
{
	public Bitmap b;
	public static float speedY = 0.1f;
	public float posY;
	public int posX;
	Paint paint;
	Random randomEnemies;
	Random posRandom;
	public long startPoint = 0;
	
	
	public Professor()
	{
		paint = new Paint();
		paint.setColor(Color.BLACK); 
		paint.setTextSize(30);
		
		randomEnemies = new Random();
		int enemiesIndex = randomEnemies.nextInt(4);
		
		posRandom = new Random();
		posX = posRandom.nextInt(300);
		
		if(enemiesIndex == 0)
		{
			b = BitmapStorage.getInstance().vinicius();
		}
	
		if(enemiesIndex == 1)
		{
			b = BitmapStorage.getInstance().hamiltinho();
		}
	
		if(enemiesIndex == 2)
		{
			b = BitmapStorage.getInstance().antonio();
		}
		
		if(enemiesIndex == 3)
		{
			b = BitmapStorage.getInstance().fabio();
		}
		
		if(b == null)
		{
			Log.i("bunda", "mole");
		}
	}
	
	public void Update()
	{
		posY += speedY;
	}
	
	public void Draw(Canvas canvas)
	{
		if(b != null)
		{
			canvas.drawBitmap(b,posX,posY,paint);
			Log.i("bunda", "drawzando");
		}
	}
	
	public void reset()
	{
		speedY = 0.1f;
		startPoint = 0;
		posY = 0;
		posY = 0;
	}
}
